package net.gqu.main;


public class ServiceRegistry {

	private GlobalApplicationService applicationService;
	private EhCacheService cacheService;
	
	private static ServiceRegistry registry = null;
	
	public synchronized static ServiceRegistry getInstance() {
		if (registry == null) {
			registry = new ServiceRegistry();
			registry.setApplicationService(new GlobalApplicationService());
			registry.setCacheService(new EhCacheService());
		}
		return registry;
	}
	
	private ServiceRegistry() {
		super();
	}

	public GlobalApplicationService getApplicationService() {
		return applicationService;
	}
	public void setApplicationService(GlobalApplicationService applicationService) {
		this.applicationService = applicationService;
	}
	public EhCacheService getCacheService() {
		return cacheService;
	}
	public void setCacheService(EhCacheService cacheService) {
		this.cacheService = cacheService;
	}
}
